<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                             "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:s="http://jboss.com/products/seam/taglib"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:rich="http://richfaces.org/rich"
                template="../layout/admin_template.xhtml">
                       
<ui:define name="body">
    
    <h:messages globalOnly="true" styleClass="message"/>
    
    <h:form id="registerForm">

        <rich:panel>
            <f:facet name="header">修改菜名</f:facet>
    
            <s:decorate id="noDecoration" template="../layout/edit.xhtml">
                <ui:define name="label">菜序号</ui:define>
                <h:inputText id="no" required="true"
                             value="#{editDish.no}"/>
            </s:decorate>
            <s:decorate id="nameDecoration" template="../layout/edit.xhtml">
                <ui:define name="label">菜名码</ui:define>
				<h:inputText id="name" required="true" value="#{editDish.name}"/>
            </s:decorate> 
          	<s:decorate id="Decoration" template="../layout/edit.xhtml">
                <ui:define name="label">菜描述</ui:define>
                <h:inputTextarea id="description" value="#{editDish.description}" cols="50" rows="5"></h:inputTextarea>
            </s:decorate> 
            <div style="clear:both"/>
      </rich:panel>  


        <!-- actions -->
        <div class="actionButtons">
        
          <h:commandButton action="#{dishAction.update}" value="更新" rendered="#{dishAction.managed}" styleClass="inputButton"/>
          <s:button action="#{dishAction.remove}" value="删除" rendered="#{dishAction.managed}" styleClass="inputButton"/> 
          <s:button view="/admin/viewSnackShop.xhtml" value="返回" rendered="#{dishAction.managed}" styleClass="inputButton">
          	<f:param name="snackShopId" value="#{dishAction.shopId}" />
          </s:button>

          <h:commandButton action="#{dishAction.persist}" value="保存" rendered="#{false}" styleClass="inputButton"/>
          <s:button view="/admin/viewSnackShop.xhtml" value="返回" rendered="#{!dishAction.managed}" styleClass="inputButton">
          	<f:param name="snackShopId" value="#{dishAction.shopId}" />
          </s:button>
        </div>     
 
    </h:form>
    
</ui:define>

</ui:composition>

